package com.szqhyxj.youxiangju.biz.equipmentActivation.activationrecord;

import com.google.gson.annotations.SerializedName;
import com.szqhyxj.youxiangju.sys.BaseResult;
import com.szqhyxj.youxiangju.sys.RetrofitFacade;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * Created by leung on 2018/11/11.
 */

public class ActivationRecordModel {

    private interface ActivationRecordService {
        @FormUrlEncoded
        @POST("posDevicePort/getportorder")
        Observable<BaseResult<List<ActivationRecordModel.RecordEntity>>> portorder(
                @Field("devNo") String devNo
        );
    }

    public static Observable<BaseResult<List<RecordEntity>>> getportorder(String devNo){
        return RetrofitFacade.Companion.getRetrofit().create(ActivationRecordService.class).portorder(devNo);
    }


    public static class RecordEntity{

        @SerializedName("portCount")
        private int portCount;

        @SerializedName("payMoney")
        private String payMoney;

        @SerializedName("payType")
        private int payType;

        @SerializedName("payDate")
        private String payDate;

        public void setPortCount(int portCount){
            this.portCount = portCount;
        }

        public int getPortCount(){
            return portCount;
        }

        public void setPayMoney(String payMoney){
            this.payMoney = payMoney;
        }

        public String getPayMoney(){
            return payMoney;
        }

        public void setPayType(int payType){
            this.payType = payType;
        }

        public int getPayType(){
            return payType;
        }

        public void setPayDate(String payDate){
            this.payDate = payDate;
        }

        public String getPayDate(){
            return payDate;
        }

        @Override
         public String toString(){
            return
                "Record{" +
                "portCount = '" + portCount + '\'' +
                ",payMoney = '" + payMoney + '\'' +
                ",payType = '" + payType + '\'' +
                ",payDate = '" + payDate + '\'' +
                "}";
            }
    }
}
